<template>
    <div>
        <div>{{$store.getters.city}}</div>
        <div>{{destination}}</div>
        <div>{{age}}</div>
        <div>{{msg}}</div>
    </div>
</template>
<script>
    import {mapGetters} from "vuex"
    export default {
        name:"detail",
        computed:{
            ...mapGetters(['city','destination','age'])
        },
        data(){
            return{
                msg:""
            }
        },
        //相当于小程序的onload，用于加载数据
        //接收来自Home组件的参数
        created(){
            let uid=this.$route.params.uid;
            this.msg=uid;
        }
    }
</script>
<style scoped>

</style>